package com.sunwayhorizo.health.hl7.persistent.pk;

import java.io.Serializable;

public class RimCoreEntyNamePartsPK implements Serializable {
    public Long entityId;
    public Long entityNameId;
    public Long entityNamePartId;
    public Long entityVersionNum;

    public RimCoreEntyNamePartsPK() {
    }

    public RimCoreEntyNamePartsPK(Long entityId, Long entityNameId, 
                           Long entityNamePartId, Long entityVersionNum) {
        this.entityId = entityId;
        this.entityNameId = entityNameId;
        this.entityNamePartId = entityNamePartId;
        this.entityVersionNum = entityVersionNum;
    }

    public boolean equals(Object other) {
        if (other instanceof RimCoreEntyNamePartsPK) {
            final RimCoreEntyNamePartsPK otherEntyNamePartsPK = (RimCoreEntyNamePartsPK) other;
            final boolean areEqual = 
                (otherEntyNamePartsPK.entityId.equals(entityId) && otherEntyNamePartsPK.entityNameId.equals(entityNameId) && otherEntyNamePartsPK.entityNamePartId.equals(entityNamePartId) && otherEntyNamePartsPK.entityVersionNum.equals(entityVersionNum));
            return areEqual;
        }
        return false;
    }

    public int hashCode() {
        return super.hashCode();
    }
}
